<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateEnglishResultsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('english_results', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('s_id');
            $table->string('e_number');
            $table->string('serial_number');
            $table->integer('semester_id');
            $table->decimal('e_jd_codes',5,2)->nullable();
            $table->decimal('e_codes',5,2)->nullable();
            $table->decimal('credit',5,2)->nullable();
            $table->string('e_name');
            $table->string('time');
            $table->string('ticket')->nullable();
            $table->integer('is_required')->default(0)->nullable();
            $table->integer('is_make_up')->default(0)->nullable();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('english_results');
    }
}
